using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Dao
{
    public class TableUnionFightBuffDao:DaoBase<TableUnionFightBuff>
    {
        public override void AddPrimaryIndex(TableUnionFightBuff model)
        {
            cachePrimary[model.UFBuffId.ToString()] = model;
        }

        public override string GetFileName()
        {
            return "TableUnionFightBuff.txt";
        }

        protected override TableUnionFightBuff ParseRowData(string[] rowData)
        {
            TableUnionFightBuff data = new TableUnionFightBuff();
			data.UFBuffId = rowData [0];

            if (string.IsNullOrEmpty(rowData[1]))
            {
                data.BuffClass = 0;
            }
            else
            {
                data.BuffClass = int.Parse(rowData[1]);
            }

            if (string.IsNullOrEmpty(rowData[2]))
            {
                data.lastTime = 0;
            }
            else
            {
                data.lastTime = double.Parse(rowData[2]);
            }
			data.buffOnEffect = rowData [3];
			data.buffOffEffect = rowData [4];
			data.buffLastEffect = rowData [5];

            return data;
        }



    }

}
